<?
	function money($x)
	{
		return '&#8369; '.number_format(floatval($x),2,'.',',');
	}
?>
<style>
	.left{text-align:left;}
	.right{text-align:right;}
</style>
<div class="span10">
	<fieldset>
		<legend><a href="<?=site_url('payroll/printpayslip');?>" class="btn btn-success btn-mini" target="_blank"><i class="icon-print"></i></a> Payslip</legend>
		<table class="table table-bordered table-striped">
			<thead>
				<tr>
					<th style="text-align:center;"  colspan="2"><?=ucwords($ep->lastname.' , '.$ep->firstname.' '.$ep->middlename[0].'.')?></th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<th style="text-align:left;">Monthly Salary:</th>
					<td style="text-align:right;"><?=money($monthly_salary);?></td>
				</tr>
				<tr>
					<th class="left">Semi Monthly Salary:</th>
					<td style="text-align:right;"><?=money($semi_monthly_salary);?></td>
				</tr>
				<tr>
					<th class="left">Deductions
						<ul>
							<li>Absences</li>
							<li>Undertime</li>
							<li>With Holding Tax:</li>
							<li>SSS</li>
							<li>Phil Health</li>
						</ul>
					</th>
					<td style="text-align:right;">
						<ul>
							<li>&nbsp;</li>
							<li><?=money($absences);?></li>
							<li><?=money($undertime);?></li>
							<li><?=money($withholding_tax);?></li>
							<li><?=money($sss);?></li>
							<li><?=money($phh);?></li>
						</ul>
					</td>
				</tr>
				<tr>
					<th class="left">Add
						<ul>
							<li>Overtime</li>
						</ul>
					</th>
					<td style="text-align:right;">
						<ul>
							<li>&nbsp;</li>
							<li><?=money($total_overtime);?></li>
						</ul>
					</td>
				</tr>
				<tr class="info">
					<th class="left">Total Salary:</th>
					<td style="text-align:right;"><?=money($total_net_pay);?></td>
				</tr>
			</tbody>
		</table>
	</fieldset>
</div>